package com.softaria.windows.logic;

import com.softaria.windows.model.PerspectiveUrl;
import com.softaria.windows.view.ViewFactory;

/**
 * Wrapper class on top of {@link HelpManager} that is used to hide possibility
 * to write help message by any author. {@link WindowsManager} creates
 * {@link HelpManager} and provides it to {@link ViewFactory}. So,
 * {@link ViewFactory} can write only as corresponding view
 * 
 * @author Roman M Kuzmin (roman@softaria.com)
 * @see HelpManager
 * @see ViewFactory
 * @see WindowsManager
 */
public class HelpWriter {

  private HelpManager helpManager;
  private PerspectiveUrl author;

  HelpWriter(PerspectiveUrl author, HelpManager helpmanager) {
    super();
    this.author = author;
    this.helpManager = helpmanager;
  }

  public void setHelpMessage(String message) {
    setHelpMessage("", message);
  }

  public void setHelpMessage(String title, String message) {
    helpManager.setHelpMessage(author, title, message);
  }

  public void addHelpMessage(String message) {
    helpManager.addHelpMessage(author, message);
  }
}
